Skip to content

gh-115942: Add locked to several multiprocessing locks#115944

Merged
sobolevn merged 10 commits into
python:mainfrom
sobolevn:issue-115942
Apr 8, 2025
Merged

gh-115942: Add locked to several multiprocessing locks#115944
sobolevn merged 10 commits into
python:mainfrom
sobolevn:issue-115942

Conversation

@sobolevn

@sobolevn sobolevn commented Feb 26, 2024

Copy link
Copy Markdown
Member

TODO:

  • Get field-expert's approval
  • Docs
  • News

@sobolevn sobolevn marked this pull request as ready for review March 13, 2024 06:44
@sobolevn sobolevn requested a review from gpshead as a code owner March 13, 2024 06:44
@sobolevn

sobolevn commented Jun 3, 2024

Copy link
Copy Markdown
Member Author

@gpshead do you have an opinion about this? :)

@sobolevn

Copy link
Copy Markdown
Member Author

friendly ping @gpshead

Comment thread Modules/_threadmodule.c Outdated
Co-authored-by: mpage <mpage@cs.stanford.edu>
Comment thread Modules/_threadmodule.c Outdated
@gpshead

gpshead commented Mar 13, 2025

Copy link
Copy Markdown
Member

FWIW this PR makes sense to me.

@sobolevn

Copy link
Copy Markdown
Member Author

Ok, then I will add all the missing details. Thanks a lot! 👍

Comment thread Lib/test/_test_multiprocessing.py

@vstinner vstinner left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please add tests on threading.RLock.locked().

@picnixz picnixz left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just some rewording. Otherwise, once tests requested by Victor are added, LGTM.

Comment thread Doc/library/multiprocessing.rst Outdated
Comment thread Doc/library/multiprocessing.rst Outdated
Comment thread Doc/library/threading.rst Outdated
Comment thread Modules/_threadmodule.c Outdated
@sobolevn

sobolevn commented Apr 1, 2025

Copy link
Copy Markdown
Member Author

@vstinner @gpshead this is now ready to be reviewed :)

@sobolevn sobolevn requested review from mpage and vstinner April 1, 2025 09:43
Comment thread Lib/threading.py Outdated
Comment thread Lib/importlib/_bootstrap.py

@vstinner vstinner left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Comment thread Doc/library/multiprocessing.rst Outdated
Comment thread Doc/library/multiprocessing.rst Outdated
Comment thread Doc/library/threading.rst Outdated
Comment thread Doc/library/threading.rst Outdated
Comment thread Lib/threading.py Outdated
Comment thread Modules/_threadmodule.c Outdated
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>

@gpshead gpshead left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wish I could object to this being a locked() method instead of a .locked property... but this is matching an existing ancient API on purpose so... LGTM.

@sobolevn sobolevn merged commit f7305a0 into python:main Apr 8, 2025
@sobolevn

sobolevn commented Apr 8, 2025

Copy link
Copy Markdown
Member Author

Thanks everyone! 🎉

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants